﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelectMeetingUser.aspx.cs"
    Inherits="Meeting.Web.Admin.SelectBase.SelectMeetingUser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>会议参与者</title>
    <script type="text/javascript" src="../../Scripts/jquery-1.8.2.min.js"></script>
    <!--树样式-->
    <script type="text/javascript" src="../../Scripts/artDialog4.1.6/artDialog.js?skin=blue"></script>
    <script type="text/javascript" src="../../Scripts/artDialog4.1.6/plugins/iframeTools.js"></script>
    <link rel="stylesheet" type="text/css" href="../../Scripts/themes/cupertino/easyui.css" />
    <link rel="stylesheet" type="text/css" href="../../Scripts/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="../../Css/main.css" />
    <script type="text/javascript" src="../../Scripts/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../Scripts/common.js"></script>
    <script type="text/javascript">
        var MeetingId = request("MeetingId");
        $(function () {
            art.dialog.removeData('result');
            //未用审核通过的topic
            $("#meetingUser").datagrid({
                url: 'SelectOperation.ashx?method=GetMeetingUser&MeetingId=' + MeetingId,
                singleSelect:true
            });
        });


        var selJson = "";
        function GetSelect() {
            var row = $("#meetingUser").datagrid("getSelected");
            if (!row) return "";
            selJson = '{"EmployeeId":"' + row.EmployeeId + '","EmployeeName":"' + row.EmployeeName
                + '","EmployeeTitle":"' + row.EmployeeTitle + '","RoleId":"' + row.RoleId + '"}';

        }

        function SelectOk() {
            GetSelect();
            if (selJson == "") {
                $.messager.alert("提示", "请选择主讲人");
                return;
            }
            selJson = "[" + selJson + "]";
            //提交 
            art.dialog.data('result', "true");
            art.dialog.data('selJson', selJson);
            art.dialog.close();
        }
        function DoSearch() {
            var name = $("#fName").val();
            $("#meetingUser").datagrid("reload", { Name: name });
        }
        
    </script>
</head>
<body style="margin: 0">
    <form id="form1" runat="server">
    <table>
        <tr>
            <td>
                姓名:
            </td>
            <td>
                <input id="fName" style="width: 120px;" class="easyui-validatebox" />
            </td>
            <td>
                <a href="#" class="easyui-linkbutton" onclick="DoSearch();">查询</a>
            </td>
        </tr>
    </table>
    <div>
        <table id="meetingUser" style="width: 460px; height: 260px">
            <thead>
                <tr>
                    <th data-options="field:'EmployeeName',width:100">
                        姓名
                    </th>
                    <th data-options="field:'EmployeeTitle',width:100 ">
                        职务
                    </th>
                    <th data-options="field:'EmployeeId',width:80,hidden:true">
                    </th>
                    <th data-options="field:'RoleId',width:250,hidden:true">
                    </th>
                </tr>
            </thead>
        </table>
    </div>
    <div style="clear: both; text-align: right; margin-top: 15px;">
        <a id="A1" class="easyui-linkbutton" onclick="SelectOk();">确定</a>
    </div>
    </form>
</body>
</html>
